package leetcode.秋招.好未来;

import java.util.Scanner;

/**
 * @author ：zsy
 * @date ：Created 2021/8/8 15:10
 * @description：
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String v1 = in.next();
        String v2 = in.next();
        String[] nums1 = v1.split(".");
        String[] nums2 = v2.split(".");
        int n1 = nums1.length;
        int n2 = nums2.length;

        int i1, i2;
        for (int i = 0; i < Math.max(n1, n2); i++) {
            i1 = i < n1 ? Integer.parseInt(nums1[i]) : 0;
            i2 = i < n2 ? Integer.parseInt(nums2[i]) : 0;
            if (i1 != i2) {
                if (i1 > i2) {
                    System.out.println(1);
                } else {
                    System.out.println(-1);
                }
                return;
            }
        }
        System.out.println(0);
    }

}
